package org.dragonnova.meetingapp.app.activity;

import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.widget.FrameLayout;
import android.widget.TextView;

import org.dragonnova.meetingapp.R;
import org.dragonnova.meetingapp.app.fragment.main.MeetingFragment;


public class MainActivity1 extends AppCompatActivity {

    private FragmentManager mFragmentManager;

    private Toolbar mToolbar;
    private TextView main_tb_tv_title;

    private String[] mTabs = {"会议"};


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main1);
        initView();
        initData();
    }

    private void initView() {
        mToolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(mToolbar);
        //设置不显示默认标题
        if (getSupportActionBar() != null) getSupportActionBar().setDisplayShowTitleEnabled(false);

        main_tb_tv_title = (TextView) findViewById(R.id.main_tb_tv_title);

        mFragmentManager = getSupportFragmentManager();

        MeetingFragment meetingFragment = new MeetingFragment();

        main_tb_tv_title.setText(mTabs[0]);

        mFragmentManager.beginTransaction().replace(R.id.main_fl_meeting_container,meetingFragment).commit();
    }

    private void initData() {

    }
}
